/* 防疫酒店 */
export const fy_hotel = {
    legend: {
        orient: 'vertical',
        right: 'right',
        top: '20'
    },
    grid: {
        width: 100
    },
    series: [
        {
            name: 'Access From',
            type: 'pie',
            radius: '90%',
            data: [
                { value: 300, name: '工作人员' },
                { value: 20, name: '访客人员' },
                { value: 100, name: '隔离人员' },
            ],
            emphasis: {
                itemStyle: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            },
            label: {
                position: 'inside'
            }

        }
    ],

};

/* 车辆统计 */
export const car_statistics = {

    grid: {
        height: 100,
    },
    title: {
        text: '出入车辆时段分析',
        left: 'center',
        subtextStyle: {
            align: 'center',
        },
        textStyle: {
            fontSize: 16,
            color: '#1e807f',
        },
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['0', '4', '8', '12', '16', '20', '24'],
    },
    yAxis: {
        type: 'value',
    },
    series: [
        {
            data: [12, 32, 75, 157, 485, 789, 842],
            type: 'line',
            areaStyle: {},
        },
    ],
}

/* 车流分析 */
export const car_analyse = {

    xAxis: {
        data: ['东区', '南区', '西区', '北区'],
    },
    grid: {
        height: 90,
    },
    yAxis: {},
    dataGroupId: '',
    animationDurationUpdate: 500,
    series: {
        barWidth: 16,
        type: 'bar',
        id: 'sales',
        itemStyle: {
            normal: {
                // 随机显示
                //color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}

                // 定制显示（按顺序）
                color: function (params) {
                    var colorList = [
                        '#fba9a9',
                        '#4cb2f9',
                        '#92e4de',
                        '#3ce49e',
                    ];
                    return colorList[params.dataIndex];
                },
            },
        },
        data: [
            {
                value: 215,
                groupId: '东区',
            },
            {
                value: 321,
                groupId: '南区',
            },
            {
                value: 89,
                groupId: '西区',
            },
            {
                value: 124,
                groupId: '北区',
            },
        ],
        universalTransition: {
            enabled: true,
            divideShape: 'clone',
        },
    },
}
/* 进出入统计 */
export const in_out_statistics = {

    title: {
        text: '进入进出如人流分析',
        left: 'center',
        top: '12',
        textStyle: {
            fontSize: 14,
            color: '#1e807f',
        },
    },
    xAxis: {
        data: ['入住客人', '访客', '重点人员'],
    },
    grid: {
        height: 110,
    },
    yAxis: {},
    dataGroupId: '',
    animationDurationUpdate: 500,
    series: {
        barWidth: 16,
        type: 'bar',
        id: 'sales',
        itemStyle: {
            normal: {
                // 随机显示
                //color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}

                // 定制显示（按顺序）
                color: function (params) {
                    var colorList = [
                        '#fba9a9',
                        '#4cb2f9',
                        '#92e4de',
                    ];
                    return colorList[params.dataIndex];
                },
            },
        },
        data: [
            {
                value: 215,
                groupId: '入住客人',
            },
            {
                value: 321,
                groupId: '访客',
            },
            {
                value: 189,
                groupId: '重点人员',
            },
        ],
        universalTransition: {
            enabled: true,
            divideShape: 'clone',
        },
    },
}
/* 访客分析 */
export const visitor_analyse = {

    grid: {
        height: 100,
    },
    title: {
        text: '今日访客时段分析',
        left: 'center',
        textStyle: {
            fontSize: 14,
            color: '#1e807f',
        },
        subtextStyle: {
            align: 'center',
        },
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['0', '4', '8', '12', '16', '20', '24'],
    },
    yAxis: {
        type: 'value',
    },
    series: [
        {
            data: [12, 32, 75, 157, 485, 789, 842],
            type: 'line',
            areaStyle: {},
        },
    ],
}
// 实施报警
export const real_time = {

    title: {
        text: '本月警告设备',
        left: 'center',
        top: '12',
        textStyle: {
            fontSize: 16,
            color: '#1e807f',
        },
    },
    xAxis: {
        data: ['门禁警告', '消防警告', '视频警告', '紧急警告'],
    },
    grid: {
        height: 180,
    },
    yAxis: {},
    dataGroupId: '',
    animationDurationUpdate: 500,
    series: {
        barWidth: 16,
        type: 'bar',
        id: 'sales',
        itemStyle: {
            normal: {
                // 随机显示
                //color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}

                // 定制显示（按顺序）
                color: function (params) {
                    var colorList = [
                        '#fba9a9',
                        '#4cb2f9',
                        '#92e4de',
                        '#3ce49e',
                    ];
                    return colorList[params.dataIndex];
                },
            },
        },
        data: [
            {
                value: 4,
                groupId: '门禁警告',
            },
            {
                value: 6,
                groupId: '消防警告',
            },
            {
                value: 17,
                groupId: '视频警告',
            },
            {
                value: 9,
                groupId: '紧急警告',
            },
        ],
        universalTransition: {
            enabled: true,
            divideShape: 'clone',
        },
    },
}

export const onlineDevice = {
    series: [
        {
            type: 'gauge',
            startAngle: 90,
            endAngle: -270,
            pointer: {
                show: false
            },
            progress: {
                show: true,
                overlap: false,
                roundCap: true,
                clip: false,
                // itemStyle: {
                //     borderWidth: 1,
                //     borderColor: '#464646'
                // }
            },
            color:[
                '#76daff'
            ],
            axisLine: {
                lineStyle: {
                    width: 6
                }
            },
            splitLine: {
                show: false,
                distance: 0,
                length: 10
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                show: false,
                distance: 50
            },
            data: [
                {
                    value: 80,
                    // name: 'Perfect',
                    title: {
                        offsetCenter: ['0%', '-30%']
                    },
                    detail: {
                        valueAnimation: true,
                        offsetCenter: ['0%', '-20%']
                    }
                },
            ],
            title: {
                fontSize: 14
            },
            detail: {
                width: 20,
                height: 20,
                fontSize: 14,
                color: 'auto',
                borderColor: 'auto',
                // borderRadius: 20,
                // borderWidth: 1,
                formatter: '{value}%'
            }
        }
    ]
};
export const offlineDevice = {
    series: [
        {
            type: 'gauge',
            startAngle: 90,
            endAngle: -270,
            pointer: {
                show: false
            },
            progress: {
                show: true,
                overlap: false,
                roundCap: true,
                clip: false,
                // itemStyle: {
                //     borderWidth: 1,
                //     borderColor: '#464646'
                // }
            },
            color:[
                '#42abfe'
            ],
            axisLine: {
                lineStyle: {
                    width: 6
                }
            },
            splitLine: {
                show: false,
                distance: 0,
                length: 10
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                show: false,
                distance: 50
            },
            data: [
                {
                    value: 50,
                    // name: 'Perfect',
                    title: {
                        offsetCenter: ['0%', '-30%']
                    },
                    detail: {
                        valueAnimation: true,
                        offsetCenter: ['0%', '-20%']
                    }
                },
            ],
            title: {
                fontSize: 14
            },
            detail: {
                width: 20,
                height: 20,
                fontSize: 14,
                color: 'auto',
                borderColor: 'auto',
                // borderRadius: 20,
                // borderWidth: 1,
                formatter: '{value}%'
            }
        }
    ]
};
export const warnDevice = {
    series: [
        {
            type: 'gauge',
            startAngle: 90,
            endAngle: -270,
            pointer: {
                show: false
            },
            progress: {
                show: true,
                overlap: false,
                roundCap: true,
                clip: false,
                // itemStyle: {
                //     borderWidth: 1,
                //     borderColor: '#464646'
                // }
            },
            color:[
                '#d16075'
            ],
            axisLine: {
                lineStyle: {
                    width: 6
                }
            },
            splitLine: {
                show: false,
                distance: 0,
                length: 10
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                show: false,
                distance: 50
            },
            data: [
                {
                    value: 20,
                    // name: 'Perfect',
                    title: {
                        offsetCenter: ['0%', '-30%']
                    },
                    detail: {
                        valueAnimation: true,
                        offsetCenter: ['0%', '-20%']
                    }
                },
            ],
            title: {
                fontSize: 14
            },
            detail: {
                width: 20,
                height: 20,
                fontSize: 14,
                color: 'auto',
                borderColor: 'auto',
                // borderRadius: 20,
                // borderWidth: 1,
                formatter: '{value}%'
            }
        }
    ]
};

